<script> 
$(function(){
  // 画面快速切换
  $("select#slcGameListStr").change(function(){
    /*if($(this).val() == 0){
      location.replace('op.php?op=admin&fp=amount1&gametype=' + $(this).val());
    }else{*/
      location.replace('op.php?op=admin&fp=amount1_3d&gametype=' + $(this).val());
    //}
  });
  
  // 快速变更钮
  $("input:button.btnChgData").click(function(){
    var sNo = $(this).parent("td").attr("id").substr(10,11);
    var oldval = "";
    var newval = "";
    var chkval = "";
    var tbdStr = "";
    var slcArr = new Array("A","B","C","D");
    var myTbd = "tbody#tbdList" + sNo;
    for (x in slcArr){
      i = x - 0 + 1;
      chkval = $("select#slc"+ slcArr[x] + sNo).val() - 0;
      tbdStr = myTbd + " input.tmpBack" + i + "[readonly!=true]";
      $(tbdStr).each(function(idx,ele){
        if(chkval != ""){
          oldval = $(ele).val() - 0;
          newval = oldval - 0 + (chkval);
          if(newval < 0){newval = 0; $(ele).css("background-color","#FDFF37");}
          else{$(ele).css("background-color","");}
          $(ele).val(check_float(newval));
        }
      }); 
    }
    // 单注限额
    chkval = $("input#iptAmount1" + sNo).val();
    if(chkval != ""){ $(myTbd + " input.tmpAmount1").val(chkval); }
    // 下注限额
    chkval = $("input#iptAmount2" + sNo).val();
    if(chkval != ""){ $(myTbd + " input.tmpAmount2").val(chkval); }
    
  });

  // 快速变更 - 清除钮
  $("input:button.btnClrData").click(function(){
    var sNo = $(this).parent("td").attr("id").substr(10,11);
    var myTd = "td#frmChgData" + sNo;
    $(myTd + " input:text").val("");
    $(myTd + " select").val("");
  });
});

function check_float(num)
{
	var numv=num-0;
	var sign=(numv>=0?1:-1); // Will give 1 for num=0
	var numabs=numv*sign;
	var naint=Math.floor(numabs);
	var nacent=Math.round((numabs-naint)*100);
	if (nacent>=100) {nacent=0; naint++;}
	var nais=''+naint;
	var nacs=(nacent<10?'0':'')+nacent;
	if (naint+nacent==0) sign=1;
	return (sign==1?'':'-')+nais+'.'+nacs;
} 

function password_link(gametype){
  var oObj = document.getElementById("password_link");
  var sUrl = "op.php?op=admin&fp=password_link&gametype=" + gametype; 
  oObj.innerHTML = "<div class='td0 bgClc_" + gametype + "' align=right><input type='button' value='&nbsp;X&nbsp;' onclick='javascript:close_password_link();' class='c4'></div><iframe name='iframe_all' src='" + sUrl + "' width='300' height='300'></iframe><br />"; 
  if(gametype == 0)oObj.className = "password_link_6h";
  else oObj.className = "password_link";
}

function close_password_link(){
  var oObj = document.getElementById("password_link");
  oObj.innerHTML = "";
  oObj.className= "noneRateRecord";
}

function sync_amu(){
  if(confirm('确定要检查「{chName}」所有帐号之基本退水限额资料吗？')){
    $("form#frmSync_amu").submit();
  }
}

</script>
<div id="password_link"></div>
<br>
{err}
<form action="{action}" method="post" name="f">
<table class="tblMy3D" width="{myWidth}">
<thead style="background-color:#666666;color:#FFFFFF">
  <tr>
  <td class={gametype} colspan="8" style="color:#000000;padding:2px;">
  &nbsp;◎&nbsp;双面盘快调&nbsp;◎
  </td>
  </tr>
  <tr align="center">
  <td class="td2" colspan="8" style="color:#000000" id="frmChgData01">
  A 盘 <select id="slcA01" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  B 盘 <select id="slcB01" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  C 盘 <select id="slcC01" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  D 盘 <select id="slcD01" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  单注限额调整<input type="text" id="iptAmount101" value="" size="5" />
  下注限额调整<input type="text" id="iptAmount201" value="" size="5" />
  <input type="button" value="快速变更" class="btnChgData" />
  <input type="button" value="清除" class="btnClrData" />
  </td>
  </tr>
  
  <tr>
  <th rowspan="2" width="100">玩法</th>
  <th colspan="4">盘口</th>
  <th rowspan="2">单注限额</th>
  <th rowspan="2">下注限额</th>
  <th rowspan="2">
  </th>
  </tr>
  
  <tr>
  <th>A 盘</th>
  <th>B 盘</th>
  <th>C 盘</th>
  <th>D 盘</th>
  </tr>
</thead>
<tbody id="tbdList01">
{tbdList1}
</tbody>
<tfoot  style="background-color:#666666;color:#FFFFFF">
  <tr>
  <th>玩法</th>
  <th colspan="4">盘口</th>
  <th>单注限额</th>
  <th>下注限额</th>
  <th>
  <input type="button" value="重读" onclick="location.replace('{url_reload}')"  />
  <input type="submit" value="{submit}">
  </th>
  </tr>
<tfoot>
</table>

<table class="tblMy3D" width="{myWidth}">
<thead style="background-color:#666666;color:#FFFFFF">
  <tr>
  <td class={gametype} colspan="8" style="color:#000000;padding:2px;">
  &nbsp;◎&nbsp;一般盘快调&nbsp;◎
  </td>
  </tr>
  <tr align="center">
  <td class="td2" colspan="8" style="color:#000000" id="frmChgData02">
  A 盘 <select id="slcA02" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  B 盘 <select id="slcB02" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  C 盘 <select id="slcC02" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  D 盘 <select id="slcD02" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  单注限额调整<input type="text" id="iptAmount102" value="" size="5" />
  下注限额调整<input type="text" id="iptAmount202" value="" size="5" />
  <input type="button" value="快速变更" class="btnChgData" />
  <input type="button" value="清除" class="btnClrData" />
  </td>
  </tr>
  
  <tr>
  <th rowspan="2" width="100">玩法</th>
  <th colspan="4">盘口</th>
  <th rowspan="2">单注限额</th>
  <th rowspan="2">下注限额</th>
  <th rowspan="2">
  </th>
  </tr>
  
  <tr>
  <th>A 盘</th>
  <th>B 盘</th>
  <th>C 盘</th>
  <th>D 盘</th>
  </tr>
</thead>
<tbody id="tbdList02">
{tbdList2}
</tbody>
<tfoot  style="background-color:#666666;color:#FFFFFF">
  <tr>
  <th>玩法</th>
  <th colspan="4">盘口</th>
  <th>单注限额</th>
  <th>下注限额</th>
  <th>
  <input type="button" value="重读" onclick="location.replace('{url_reload}')"  />
  <input type="submit" value="{submit}">
  </th>
  </tr>
<tfoot>
</table>
</form>
<form action="{action}" method="post" id="frmSync_amu">
<input type="hidden" name="sync_amu" value="1" />
</form>
{othertext}   